#ifndef DATASHOWPAGE_H
#define DATASHOWPAGE_H

#include <QtCore/qglobal.h>

#if defined(DATASHOAPAGE_LIBRARY)
#define DATASHOAPAGE_EXPORT Q_DECL_EXPORT
#else
#define DATASHOAPAGE_EXPORT Q_DECL_IMPORT
#endif


#include <QWidget>
#include <QDebug>
#include <QListView>
#include <QStandardItemModel>

#include "../NetWorkMgr/networkmgr.h"
#include "../CustomCtrl/CPageCtrl/cpagectrl.h"
#include "../CustomCtrl/CSearchCtrl/CSearchCtrl.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class Widget;
}
QT_END_NAMESPACE

class DATASHOAPAGE_EXPORT DataShowPageWidget : public QWidget
{
    Q_OBJECT

public:
    DataShowPageWidget(QWidget *parent = nullptr);
    ~DataShowPageWidget();

private slots:
    void OnGetPersonInfoListDone(const QJsonObject &jsResult);

    void OnPageNumChange(const int & nPageNum);

    void OnSearchClicked();
private:
    void Init();
    void GetPersonInfoList(int nCurPage = 0);

private:
    Ui::Widget *ui;

    QWidget *m_rightWdiget;
    QWidget *m_leftWdiget;

    CPageCtrl * m_CPageCtrl;
    QListView * m_pPersonList;
    CSearchCtrl * m_pSearch;
};
#endif // DATASHOWPAGE_H
